﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClassWeibo.aspx.cs" Inherits="School.SystemManage.WebPages.Contact.ClassWeibo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="../../css/right.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .rbt td{ border:none;}
        .ddl{ width:100px;}
        .weibo_td2{ text-align:left;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container">
        <div class="title_bg">
            <div class="floatLeft title_text_div">联络平台 > 班级微博</div> 
            <ul class="floatRight">
                <%--<li><input id="chk_Total" type="checkbox" class="floatLeft" onclick="CheckAll(this,false);" /><span class="checkAll floatLeft">全选</span><div class="clear"></div></li>
                <li class="delete"><asp:LinkButton ID="lbtnDelete" runat="server" 
                        OnClientClick="return HasCheckedRow();" onclick="lbtnDelete_Click">删除</asp:LinkButton></li>--%>
            </ul>
            <div class="clear"></div>
        </div> 
        <div>
            <asp:ListView ID="lv_list" runat="server" DataKeyNames="WID" 
                ItemPlaceholderID="PlaceHolder1" onitemcanceling="lv_list_ItemCanceling" 
                onitemdatabound="lv_list_ItemDataBound" onitemdeleting="lv_list_ItemDeleting" 
                onitemediting="lv_list_ItemEditing" onitemupdating="lv_list_ItemUpdating">
                <LayoutTemplate>
                    <table cellspacing="0" class="dataTable">
                        <tr>
                            <th>专业</th>
                            <th>年级</th>
                            <th>班级</th>
                            <th>微博地址</th>
                            <th>启用连接</th>
                            <th>操作</th>
                        </tr>
                        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%#GetMajor(Eval("Major").ToString())%></td>
                        <td><%#GetGrade(Eval("Grade").ToString())%></td>
                        <td><%#Eval("ClassName") %></td>
                        <td><%#Eval("Url") %></td>
                        <td><%#Eval("IsLinked").ToString()=="True"?"是":"否" %></td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit">编辑</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete">删除</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
                <EditItemTemplate>
                     <tr>
                        <td>
                            <asp:DropDownList ID="ddlMajor" runat="server">
                                <asp:ListItem Value="0" Text="会计"></asp:ListItem>
                                <asp:ListItem Value="1" Text="国贸"></asp:ListItem>
                                <asp:ListItem Value="2" Text="营销"></asp:ListItem>
                                <asp:ListItem Value="3" Text="国商"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlGrade" runat="server">
                                <asp:ListItem Value="1" Text="一年级"></asp:ListItem>
                                <asp:ListItem Value="2" Text="二年级"></asp:ListItem>
                                <asp:ListItem Value="3" Text="三年级"></asp:ListItem>
                                <asp:ListItem Value="4" Text="四年级"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td><asp:TextBox ID="txbClassName" runat="server" Text='<%#Eval("ClassName") %>'></asp:TextBox></td>
                        <td><asp:TextBox ID="txbUrl" runat="server" Text='<%#Eval("Url") %>'></asp:TextBox></td>
                        <td>
                            <asp:RadioButtonList ID="rbtIsLinked" runat="server" RepeatDirection="Horizontal" CssClass="rbt">
                                <asp:ListItem Value="0">否</asp:ListItem>
                                <asp:ListItem Value="1">是</asp:ListItem>
                            </asp:RadioButtonList>                            
                        </td>
                        <td>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update">确定</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel">取消</asp:LinkButton>
                        </td>
                    </tr>
                </EditItemTemplate>
                <EmptyItemTemplate>
                    没有数据
                </EmptyItemTemplate>
            </asp:ListView>
        </div>
        <div>
            <table cellspacing="0" class="dataTable" runat="server" id="addTable">
                <tr>
                    <th colspan="2">添加班级微博</th>
                </tr>
                <tr>
                    <td class="td1">专业</td>
                    <td class="weibo_td2">
                        <asp:DropDownList ID="ddlMajor" runat="server" CssClass="ddl">
                            <asp:ListItem Value="0" Text="会计"></asp:ListItem>
                            <asp:ListItem Value="1" Text="国贸"></asp:ListItem>
                            <asp:ListItem Value="2" Text="营销"></asp:ListItem>
                            <asp:ListItem Value="3" Text="国商"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="td1">年级</td>
                    <td class="weibo_td2">
                        <asp:DropDownList ID="ddlGrade" runat="server" CssClass="ddl">
                            <asp:ListItem Value="1" Text="一年级"></asp:ListItem>
                            <asp:ListItem Value="2" Text="二年级"></asp:ListItem>
                            <asp:ListItem Value="3" Text="三年级"></asp:ListItem>
                            <asp:ListItem Value="3" Text="四年级"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="td1">班级名称</td>
                    <td class="weibo_td2"><asp:TextBox ID="txbClassName" runat="server" Text=''></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="td1">连接地址</td>
                    <td class="weibo_td2"><asp:TextBox ID="txbUrl" runat="server" Text='' Width="99%"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="td1">开启连接</td>
                    <td class="weibo_td2">
                        <asp:RadioButtonList ID="rbtIsLinked" runat="server" RepeatDirection="Horizontal" CssClass="rbt">
                            <asp:ListItem Value="0">否</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="btnSubmit" runat="server" Text="提交" onclick="btnSubmit_Click" />
                        <asp:Label ID="lblMsg" runat="server" Text="" CssClass="red"></asp:Label>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
